<!DOCTYPE html>
<html class='h100'>

	<head>
		<meta charset="UTF-8">
		<title>宇成建筑</title>
		<link rel="stylesheet" href="../statics/plugins/layui/css/layui.css" />
		<link rel="stylesheet" href="../statics/css/xadmin.css" />
		<style>
			.content {
				width: 100%;
				height: 100%;
				margin: 0;
				background: #EFEEF0;
				padding: 15px;
				overflow: auto;
			}
			.layui-elem-quote{
				margin-bottom: 0;
			}
			.layui-card {
				border-top: 1px solid #dce0e3;
			}
			
			.layui-col-space15>* {
				padding: 7.5px;
			}
			.layui-table {
			    width: 100%;
			    background-color: #fff;
			    color: #666;
			}
			.layui-table tr {
			    transition: all .3s;
			    -webkit-transition: all .3s;
			}
			.x-admin-sm .layui-table td, .x-admin-sm .layui-table th {
			    font-size: 12px;
			}
			.layui-table td, .layui-table th {
			    position: relative;
			    padding: 9px 15px;
			    min-height: 20px;
			    line-height: 20px;
			    font-size: 14px;
			}
			.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
			    border-width: 1px;
			    border-style: solid;
			    border-color: #e6e6e6;
			}
			.titleMessage .layui-col-xs12{
				height:40px;
				line-height: 40px;
				border-bottom: 1px solid #eee;
			}
			.titleMessage .layui-col-xs12 span{
				color:#333;
				font-size: 13px;
			}
			.titleMessage{
				max-height: 400px;
    			overflow: auto;
			}
		</style>
	</head>

	<body class='h100'>
		<div class="content h100 layui-col-space15">
			<!--登录头部-->
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-body ">
						<blockquote class="layui-elem-quote">欢迎您：
							<span class="x-red x_red"></span>！当前时间:<span class='time'></span>
						</blockquote>
					</div>
				</div>
			</div>
			<div class="layui-col-md12" style='display: none;'>
				<div class="layui-card">
					<div class="layui-card-header">数据统计</div>
					<div class="layui-card-body ">
						<ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
							<li class="layui-col-md2 layui-col-xs6">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>文章数</h3>
									<p>
										<cite>66</cite></p>
								</a>
							</li>
							<li class="layui-col-md2 layui-col-xs6">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>会员数</h3>
									<p>
										<cite>12</cite></p>
								</a>
							</li>
							<li class="layui-col-md2 layui-col-xs6">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>回复数</h3>
									<p>
										<cite>99</cite></p>
								</a>
							</li>
							<li class="layui-col-md2 layui-col-xs6">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>商品数</h3>
									<p>
										<cite>67</cite></p>
								</a>
							</li>
							<li class="layui-col-md2 layui-col-xs6">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>文章数</h3>
									<p>
										<cite>67</cite></p>
								</a>
							</li>
							<li class="layui-col-md2 layui-col-xs6 ">
								<a href="javascript:;" class="x-admin-backlog-body">
									<h3>文章数</h3>
									<p>
										<cite>6766</cite></p>
								</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="layui-col-sm6 layui-col-md3" style='display: none;'>
				<div class="layui-card">
					<div class="layui-card-header">下载
						<span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
					<div class="layui-card-body  ">
						<p class="layuiadmin-big-font">33,555</p>
						<p>新下载
							<span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
						</p>
					</div>
				</div>
			</div>
			<div class="layui-col-sm6 layui-col-md3" style='display: none;'>
				<div class="layui-card">
					<div class="layui-card-header">下载
						<span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
					<div class="layui-card-body ">
						<p class="layuiadmin-big-font">33,555</p>
						<p>新下载
							<span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
						</p>
					</div>
				</div>
			</div>
			<div class="layui-col-sm6 layui-col-md3" style='display: none;'>
				<div class="layui-card">
					<div class="layui-card-header">下载
						<span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
					<div class="layui-card-body ">
						<p class="layuiadmin-big-font">33,555</p>
						<p>新下载
							<span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
						</p>
					</div>
				</div>
			</div>
			<div class="layui-col-sm6 layui-col-md3" style='display: none;'>
				<div class="layui-card">
					<div class="layui-card-header">下载
						<span class="layui-badge layui-bg-cyan layuiadmin-badge">月</span></div>
					<div class="layui-card-body ">
						<p class="layuiadmin-big-font">33,555</p>
						<p>新下载
							<span class="layuiadmin-span-color">10%
                                    <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
						</p>
					</div>
				</div>
			</div>
			<!--系统信息-->
			<!-- <div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header">系统信息</div>
					<div class="layui-card-body ">
						<table class="layui-table">
							<tbody>
								<tr>
									<th>君正方华建筑施工劳务企业管理系统版本</th>
									<td class='softVersion'></td>
								</tr>
								<tr>
									<th>服务器地址</th>
									<td class='host'></td>
								</tr>
								<tr>
									<th>操作系统</th>
									<td class='server'></td>
								</tr>
								<tr>
									<th>运行环境</th>
									<td class='env'></td>
								</tr>
								<tr>
									<th>PHP版本</th>
									<td class='PHPVersion'></td>
								</tr>
								<tr>
									<th>PHP运行方式</th>
									<td class='cgi'></td>
								</tr>
								<tr>
									<th>MYSQL版本</th>
									<td class='mysqlVersion'>5.5.53</td>
								</tr>
								<tr>
									<th>执行时间</th>
									<td class="times"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div> -->
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header">通知公告</div>
					<div class="layui-card-body ">
						<div class="layui-row titleMessage">
							
						</div>
					</div>
				</div>
			</div>
			<!--开发团队-->
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header">开发团队</div>
					<div class="layui-card-body ">
						<table class="layui-table">
							<tbody>
								<tr>
									<th>版权所有</th>
									<td>君正方华
										<!--<a href="http://x.xuebingsi.com/" target="_blank">访问官网</a>-->
									</td>
								</tr>
								<tr>
									<th>开发者</th>
									<td>韩鹏 , 王泓睿 , 李俊杰 , 闫梓璇</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>

		<script src='../statics/plugins/jQuery-3.2.1/jquery-3.2.1.min.js'></script>
		<script src='../statics/plugins/layui/layui.js'></script>
		<script src="../statics/js/public.js?v=1129"></script>
		<script>
			//x-red
			var name=$.parseJSON(localStorage.getItem('login_msg')).username;
			$('.x_red').html(name);
			var time=fomDate('yyyy-mm-dd HH:MM:SS');
			$('.time').html(time);
			setInterval(function(){
				var time=fomDate('yyyy-mm-dd HH:MM:SS');
				$('.time').html(time);
			},1000);
			$.ajax({
				url:url+'/setting/notice/showLists',
				type:"post",
				data:{
					token: $.parseJSON(localStorage.getItem('login_msg')).token
				},
				success:function(r){
					if(r.code==100000){
						var div='';
						for(var i=0;i<r.data.length;i++){
							div+=`
								<div class="layui-col-xs12" data-id=${r.data[i].id}>
									<div class="layui-col-xs10">
										<span>${r.data[i].title}</span>
									</div>
									<div class="layui-col-xs2 text-right">
										<span>${r.data[i].updateTime}</span>
									</div>
								</div>
							`
						}
						$('.titleMessage').html(div);
					}
				}
			})
			$('body').on('click','.titleMessage .layui-col-xs12',function(){
				var id=$(this).data('id');
				$.ajax({
					url:url+'/setting/notice/showInfo',
					type:"post",
					data:{
						id:Number(id),
						token: $.parseJSON(localStorage.getItem('login_msg')).token
					},
					success:function(r){
						if(r.code==100000){
							layui.use('layer', function() {
								var layer = layui.layer;
								layer.open({
									type: 1,
									title:r.data.title,
									area: ["60%", '60%'],
									content:`
										<div class='layui-row' style="padding:15px">
											<div class='layui-col-xs12'>
												${r.data.content}
											</div>
										</div>
									`,
									btn: ['关闭'],
									skin: 'my-skin'
								})
							});
						}else{
							layui.use('layer', function() {
								var layer = layui.layer;
								layer.open({
									type: 1,
									title: "通知公告",
									area: ["40%", '30%'],
									content:`${r.msg}`,
									btn: ['关闭'],
									skin: 'my-skin'
								})
							});
						}
					}
				})
			})
		</script>
	</body>

</html>